home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 June / CHIP Haziran 2001.iso / prog / haziran / 19 / setup.exe / data.z / pp_gui.frm < prev    next >
Text File  |  2001-04-11  |  36KB  |  1,272 lines

  1. VERSION 5.00
  2. Begin VB.Form pp_gui 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Prallel Port Sample"
  5.    ClientHeight    =   3564
  6.    ClientLeft      =   36
  7.    ClientTop       =   264
  8.    ClientWidth     =   6972
  9.    Icon            =   "pp_gui.frx":0000
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   3564
  14.    ScaleWidth      =   6972
  15.    StartUpPosition =   3  'Windows Default
  16.    Begin VB.CheckBox AutoReadCheck 
  17.       Caption         =   "AutoRead"
  18.       Height          =   252
  19.       Left            =   120
  20.       TabIndex        =   2
  21.       Top             =   720
  22.       Value           =   1  'Checked
  23.       Width           =   1092
  24.    End
  25.    Begin VB.Timer AutoReadClock 
  26.       Enabled         =   0   'False
  27.       Interval        =   200
  28.       Left            =   5760
  29.       Top             =   1200
  30.    End
  31.    Begin VB.CommandButton About_Button 
  32.       Caption         =   "About"
  33.       Height          =   372
  34.       Left            =   4800
  35.       TabIndex        =   5
  36.       Top             =   120
  37.       Width           =   972
  38.    End
  39.    Begin VB.CommandButton Exit_Button 
  40.       Caption         =   "Exit"
  41.       Height          =   372
  42.       Left            =   5880
  43.       TabIndex        =   6
  44.       Top             =   120
  45.       Width           =   972
  46.    End
  47.    Begin VB.CommandButton ReadRegisters_Button 
  48.       Caption         =   "Read"
  49.       Height          =   252
  50.       Left            =   120
  51.       TabIndex        =   1
  52.       Top             =   1080
  53.       Width           =   972
  54.    End
  55.    Begin VB.ComboBox Destination 
  56.       Height          =   288
  57.       ItemData        =   "pp_gui.frx":030A
  58.       Left            =   120
  59.       List            =   "pp_gui.frx":0317
  60.       Style           =   2  'Dropdown List
  61.       TabIndex        =   0
  62.       Top             =   120
  63.       Width           =   1332
  64.    End
  65.    Begin VB.CommandButton WriteControl_Button 
  66.       Caption         =   "Write"
  67.       Height          =   252
  68.       Left            =   6000
  69.       TabIndex        =   4
  70.       Top             =   2880
  71.       Width           =   732
  72.    End
  73.    Begin VB.CommandButton WriteData_Button 
  74.       Caption         =   "Write"
  75.       Height          =   252
  76.       Left            =   1440
  77.       TabIndex        =   3
  78.       Top             =   960
  79.       Width           =   732
  80.    End
  81.    Begin VB.TextBox Text2 
  82.       Alignment       =   2  'Center
  83.       Appearance      =   0  'Flat
  84.       Enabled         =   0   'False
  85.       Height          =   252
  86.       Left            =   4080
  87.       TabIndex        =   12
  88.       Top             =   2880
  89.       Width           =   252
  90.    End
  91.    Begin VB.TextBox Text3 
  92.       Alignment       =   2  'Center
  93.       Appearance      =   0  'Flat
  94.       Enabled         =   0   'False
  95.       Height          =   252
  96.       Left            =   3840
  97.       TabIndex        =   11
  98.       Top             =   2880
  99.       Width           =   252
  100.    End
  101.    Begin VB.TextBox Text4 
  102.       Alignment       =   2  'Center
  103.       Appearance      =   0  'Flat
  104.       Enabled         =   0   'False
  105.       Height          =   252
  106.       Left            =   3600
  107.       TabIndex        =   10
  108.       Top             =   2880
  109.       Width           =   252
  110.    End
  111.    Begin VB.TextBox Text5 
  112.       Appearance      =   0  'Flat
  113.       Enabled         =   0   'False
  114.       Height          =   252
  115.       Left            =   1776
  116.       TabIndex        =   9
  117.       Top             =   2880
  118.       Width           =   252
  119.    End
  120.    Begin VB.TextBox Text6 
  121.       Appearance      =   0  'Flat
  122.       Enabled         =   0   'False
  123.       Height          =   252
  124.       Left            =   2016
  125.       TabIndex        =   8
  126.       Top             =   2880
  127.       Width           =   252
  128.    End
  129.    Begin VB.TextBox Text7 
  130.       Appearance      =   0  'Flat
  131.       Enabled         =   0   'False
  132.       Height          =   252
  133.       Left            =   2256
  134.       TabIndex        =   7
  135.       Top             =   2880
  136.       Width           =   252
  137.    End
  138.    Begin VB.Line Line30 
  139.       X1              =   792
  140.       X2              =   792
  141.       Y1              =   2088
  142.       Y2              =   2810
  143.    End
  144.    Begin VB.Line Line23 
  145.       X1              =   996
  146.       X2              =   996
  147.       Y1              =   2448
  148.       Y2              =   2810
  149.    End
  150.    Begin VB.Line Line13 
  151.       X1              =   1200
  152.       X2              =   1200
  153.       Y1              =   2472
  154.       Y2              =   2810
  155.    End
  156.    Begin VB.Line Line3 
  157.       X1              =   1428
  158.       X2              =   1428
  159.       Y1              =   2520
  160.       Y2              =   2810
  161.    End
  162.    Begin VB.Line Line34 
  163.       X1              =   5388
  164.       X2              =   5388
  165.       Y1              =   1992
  166.       Y2              =   2810
  167.    End
  168.    Begin VB.Line Line55 
  169.       X1              =   624
  170.       X2              =   816
  171.       Y1              =   2904
  172.       Y2              =   2904
  173.    End
  174.    Begin VB.Line Line54 
  175.       X1              =   5304
  176.       X2              =   5496
  177.       Y1              =   2904
  178.       Y2              =   2904
  179.    End
  180.    Begin VB.Line Line53 
  181.       X1              =   5076
  182.       X2              =   5268
  183.       Y1              =   2904
  184.       Y2              =   2904
  185.    End
  186.    Begin VB.Line Line52 
  187.       Index           =   0
  188.       X1              =   4596
  189.       X2              =   4788
  190.       Y1              =   2904
  191.       Y2              =   2904
  192.    End
  193.    Begin VB.Label Status 
  194.       Caption         =   "00"
  195.       Height          =   252
  196.       Left            =   2676
  197.       TabIndex        =   39
  198.       Top             =   2916
  199.       Width           =   252
  200.    End
  201.    Begin VB.Label Control 
  202.       Caption         =   "00"
  203.       Height          =   252
  204.       Left            =   5676
  205.       TabIndex        =   38
  206.       Top             =   2904
  207.       Width           =   252
  208.    End
  209.    Begin VB.Label Data 
  210.       Caption         =   "00"
  211.       Height          =   252
  212.       Left            =   4416
  213.       TabIndex        =   37
  214.       Top             =   972
  215.       Width           =   252
  216.    End
  217.    Begin VB.Line Line1 
  218.       BorderWidth     =   3
  219.       Index           =   0
  220.       X1              =   1200
  221.       X2              =   4680
  222.       Y1              =   1800
  223.       Y2              =   1800
  224.    End
  225.    Begin VB.Line Line2 
  226.       BorderWidth     =   3
  227.       X1              =   1200
  228.       X2              =   1560
  229.       Y1              =   1800
  230.       Y2              =   2400
  231.    End
  232.    Begin VB.Line Line16 
  233.       BorderWidth     =   3
  234.       X1              =   4680
  235.       X2              =   4320
  236.       Y1              =   1800
  237.       Y2              =   2400
  238.    End
  239.    Begin VB.Line Line29 
  240.       BorderColor     =   &H00000000&
  241.       BorderWidth     =   3
  242.       X1              =   1560
  243.       X2              =   4320
  244.       Y1              =   2400
  245.       Y2              =   2400
  246.    End
  247.    Begin VB.Shape Pin25 
  248.       Height          =   132
  249.       Left            =   1560
  250.       Shape           =   3  'Circle
  251.       Top             =   2160
  252.       Width           =   132
  253.    End
  254.    Begin VB.Shape Pin24 
  255.       Height          =   132
  256.       Left            =   1800
  257.       Shape           =   3  'Circle
  258.       Top             =   2160
  259.       Width           =   132
  260.    End
  261.    Begin VB.Shape Pin23 
  262.       Height          =   132
  263.       Left            =   2040
  264.       Shape           =   3  'Circle
  265.       Top             =   2160
  266.       Width           =   132
  267.    End
  268.    Begin VB.Shape Pin22 
  269.       Height          =   132
  270.       Left            =   2280
  271.       Shape           =   3  'Circle
  272.       Top             =   2160
  273.       Width           =   132
  274.    End
  275.    Begin VB.Shape Pin21 
  276.       Height          =   132
  277.       Left            =   2520
  278.       Shape           =   3  'Circle
  279.       Top             =   2160
  280.       Width           =   132
  281.    End
  282.    Begin VB.Shape Pin20 
  283.       Height          =   132
  284.       Left            =   2760
  285.       Shape           =   3  'Circle
  286.       Top             =   2160
  287.       Width           =   132
  288.    End
  289.    Begin VB.Shape Pin19 
  290.       Height          =   132
  291.       Left            =   3000
  292.       Shape           =   3  'Circle
  293.       Top             =   2160
  294.       Width           =   132
  295.    End
  296.    Begin VB.Shape Pin18 
  297.       Height          =   132
  298.       Left            =   3240
  299.       Shape           =   3  'Circle
  300.       Top             =   2160
  301.       Width           =   132
  302.    End
  303.    Begin VB.Shape Pin17 
  304.       BorderColor     =   &H0000FFFF&
  305.       FillColor       =   &H0000FFFF&
  306.       Height          =   132
  307.       Left            =   3480
  308.       Shape           =   3  'Circle
  309.       Top             =   2160
  310.       Width           =   132
  311.    End
  312.    Begin VB.Shape Pin16 
  313.       BorderColor     =   &H0000FFFF&
  314.       FillColor       =   &H0000FFFF&
  315.       Height          =   132
  316.       Left            =   3720
  317.       Shape           =   3  'Circle
  318.       Top             =   2160
  319.       Width           =   132
  320.    End
  321.    Begin VB.Shape Pin15 
  322.       BorderColor     =   &H000000FF&
  323.       FillColor       =   &H000000FF&
  324.       Height          =   132
  325.       Left            =   3960
  326.       Shape           =   3  'Circle
  327.       Top             =   2160
  328.       Width           =   132
  329.    End
  330.    Begin VB.Shape Pin14 
  331.       BorderColor     =   &H0000FFFF&
  332.       FillColor       =   &H0000FFFF&
  333.       Height          =   132
  334.       Left            =   4200
  335.       Shape           =   3  'Circle
  336.       Top             =   2160
  337.       Width           =   132
  338.    End
  339.    Begin VB.Shape Pin13 
  340.       BorderColor     =   &H000000FF&
  341.       FillColor       =   &H000000FF&
  342.       Height          =   132
  343.       Left            =   1440
  344.       Shape           =   3  'Circle
  345.       Top             =   1920
  346.       Width           =   132
  347.    End
  348.    Begin VB.Shape Pin12 
  349.       BorderColor     =   &H000000FF&
  350.       FillColor       =   &H000000FF&
  351.       Height          =   132
  352.       Left            =   1680
  353.       Shape           =   3  'Circle
  354.       Top             =   1920
  355.       Width           =   132
  356.    End
  357.    Begin VB.Shape Pin11 
  358.       BorderColor     =   &H000000FF&
  359.       FillColor       =   &H000000FF&
  360.       Height          =   132
  361.       Left            =   1920
  362.       Shape           =   3  'Circle
  363.       Top             =   1920
  364.       Width           =   132
  365.    End
  366.    Begin VB.Shape Pin10 
  367.       BorderColor     =   &H000000FF&
  368.       FillColor       =   &H000000FF&
  369.       Height          =   132
  370.       Left            =   2124
  371.       Shape           =   3  'Circle
  372.       Top             =   1920
  373.       Width           =   132
  374.    End
  375.    Begin VB.Shape Pin9 
  376.       BorderColor     =   &H8000000D&
  377.       FillColor       =   &H8000000D&
  378.       Height          =   132
  379.       Left            =   2400
  380.       Shape           =   3  'Circle
  381.       Top             =   1920
  382.       Width           =   132
  383.    End
  384.    Begin VB.Shape Pin8 
  385.       BorderColor     =   &H8000000D&
  386.       FillColor       =   &H8000000D&
  387.       Height          =   132
  388.       Left            =   2640
  389.       Shape           =   3  'Circle
  390.       Top             =   1920
  391.       Width           =   132
  392.    End
  393.    Begin VB.Shape Pin7 
  394.       BorderColor     =   &H8000000D&
  395.       FillColor       =   &H8000000D&
  396.       Height          =   132
  397.       Left            =   2880
  398.       Shape           =   3  'Circle
  399.       Top             =   1920
  400.       Width           =   132
  401.    End
  402.    Begin VB.Shape Pin6 
  403.       BorderColor     =   &H8000000D&
  404.       FillColor       =   &H8000000D&
  405.       Height          =   132
  406.       Left            =   3120
  407.       Shape           =   3  'Circle
  408.       Top             =   1920
  409.       Width           =   132
  410.    End
  411.    Begin VB.Shape Pin5 
  412.       BorderColor     =   &H8000000D&
  413.       FillColor       =   &H8000000D&
  414.       Height          =   132
  415.       Left            =   3360
  416.       Shape           =   3  'Circle
  417.       Top             =   1920
  418.       Width           =   132
  419.    End
  420.    Begin VB.Shape Pin4 
  421.       BorderColor     =   &H8000000D&
  422.       FillColor       =   &H8000000D&
  423.       Height          =   132
  424.       Left            =   3600
  425.       Shape           =   3  'Circle
  426.       Top             =   1920
  427.       Width           =   132
  428.    End
  429.    Begin VB.Shape Pin3 
  430.       BorderColor     =   &H8000000D&
  431.       FillColor       =   &H8000000D&
  432.       Height          =   132
  433.       Left            =   3840
  434.       Shape           =   3  'Circle
  435.       Top             =   1920
  436.       Width           =   132
  437.    End
  438.    Begin VB.Shape Pin2 
  439.       BorderColor     =   &H8000000D&
  440.       FillColor       =   &H8000000D&
  441.       Height          =   132
  442.       Left            =   4080
  443.       Shape           =   3  'Circle
  444.       Top             =   1920
  445.       Width           =   132
  446.    End
  447.    Begin VB.Shape Pin1 
  448.       BorderColor     =   &H0000FFFF&
  449.       FillColor       =   &H0000FFFF&
  450.       Height          =   132
  451.       Left            =   4320
  452.       Shape           =   3  'Circle
  453.       Top             =   1920
  454.       Width           =   132
  455.    End
  456.    Begin VB.Shape Shape1 
  457.       BorderColor     =   &H8000000C&
  458.       Height          =   612
  459.       Left            =   120
  460.       Shape           =   4  'Rounded Rectangle
  461.       Top             =   2760
  462.       Width           =   3012
  463.    End
  464.    Begin VB.Label Label5 
  465.       Alignment       =   2  'Center
  466.       Appearance      =   0  'Flat
  467.       BackColor       =   &H80000005&
  468.       BorderStyle     =   1  'Fixed Single
  469.       Caption         =   "S7"
  470.       ForeColor       =   &H80000008&
  471.       Height          =   252
  472.       Index           =   0
  473.       Left            =   600
  474.       TabIndex        =   36
  475.       Top             =   2880
  476.       Width           =   240
  477.    End
  478.    Begin VB.Label Label4 
  479.       Alignment       =   2  'Center
  480.       Appearance      =   0  'Flat
  481.       BackColor       =   &H80000005&
  482.       BorderStyle     =   1  'Fixed Single
  483.       Caption         =   "S6"
  484.       ForeColor       =   &H80000008&
  485.       Height          =   252
  486.       Index           =   4
  487.       Left            =   828
  488.       TabIndex        =   35
  489.       Top             =   2880
  490.       Width           =   252
  491.    End
  492.    Begin VB.Label Label3 
  493.       Alignment       =   2  'Center
  494.       Appearance      =   0  'Flat
  495.       BackColor       =   &H80000005&
  496.       BorderStyle     =   1  'Fixed Single
  497.       Caption         =   "S5"
  498.       ForeColor       =   &H80000008&
  499.       Height          =   252
  500.       Index           =   5
  501.       Left            =   1056
  502.       TabIndex        =   34
  503.       Top             =   2880
  504.       Width           =   252
  505.    End
  506.    Begin VB.Label Label2 
  507.       Alignment       =   2  'Center
  508.       Appearance      =   0  'Flat
  509.       BackColor       =   &H80000005&
  510.       BorderStyle     =   1  'Fixed Single
  511.       Caption         =   "S4"
  512.       ForeColor       =   &H80000008&
  513.       Height          =   252
  514.       Index           =   6
  515.       Left            =   1296
  516.       TabIndex        =   33
  517.       Top             =   2880
  518.       Width           =   252
  519.    End
  520.    Begin VB.Label Label1 
  521.       Alignment       =   2  'Center
  522.       Appearance      =   0  'Flat
  523.       BackColor       =   &H80000005&
  524.       BorderStyle     =   1  'Fixed Single
  525.       Caption         =   "S3"
  526.       ForeColor       =   &H80000008&
  527.       Height          =   252
  528.       Index           =   7
  529.       Left            =   1536
  530.       TabIndex        =   32
  531.       Top             =   2880
  532.       Width           =   252
  533.    End
  534.    Begin VB.Label Status_Lable 
  535.       BackColor       =   &H8000000A&
  536.       Caption         =   " Status"
  537.       Height          =   252
  538.       Left            =   192
  539.       TabIndex        =   31
  540.       Top             =   2580
  541.       Width           =   528
  542.    End
  543.    Begin VB.Label Label6 
  544.       Caption         =   "= "
  545.       Height          =   252
  546.       Index           =   0
  547.       Left            =   2544
  548.       TabIndex        =   30
  549.       Top             =   2904
  550.       Width           =   108
  551.    End
  552.    Begin VB.Shape Shape2 
  553.       BorderColor     =   &H8000000C&
  554.       Height          =   612
  555.       Left            =   3480
  556.       Shape           =   4  'Rounded Rectangle
  557.       Top             =   2760
  558.       Width           =   3372
  559.    End
  560.    Begin VB.Label Control_Label 
  561.       Caption         =   " Control"
  562.       Height          =   252
  563.       Left            =   3576
  564.       TabIndex        =   29
  565.       Top             =   2580
  566.       Width           =   612
  567.    End
  568.    Begin VB.Label Label8 
  569.       Alignment       =   2  'Center
  570.       Appearance      =   0  'Flat
  571.       BackColor       =   &H80000005&
  572.       BorderStyle     =   1  'Fixed Single
  573.       Caption         =   "C3"
  574.       ForeColor       =   &H80000008&
  575.       Height          =   252
  576.       Index           =   0
  577.       Left            =   4560
  578.       TabIndex        =   28
  579.       Top             =   2880
  580.       Width           =   252
  581.    End
  582.    Begin VB.Label Label5 
  583.       Alignment       =   2  'Center
  584.       Appearance      =   0  'Flat
  585.       BackColor       =   &H80000005&
  586.       BorderStyle     =   1  'Fixed Single
  587.       Caption         =   "C2"
  588.       ForeColor       =   &H80000008&
  589.       Height          =   252
  590.       Index           =   4
  591.       Left            =   4800
  592.       TabIndex        =   27
  593.       Top             =   2880
  594.       Width           =   252
  595.    End
  596.    Begin VB.Label Label5 
  597.       Alignment       =   2  'Center
  598.       Appearance      =   0  'Flat
  599.       BackColor       =   &H80000005&
  600.       BorderStyle     =   1  'Fixed Single
  601.       Caption         =   "C0"
  602.       ForeColor       =   &H80000008&
  603.       Height          =   252
  604.       Index           =   5
  605.       Left            =   5280
  606.       TabIndex        =   26
  607.       Top             =   2880
  608.       Width           =   252
  609.    End
  610.    Begin VB.Label Label5 
  611.       Alignment       =   2  'Center
  612.       Appearance      =   0  'Flat
  613.       BackColor       =   &H80000005&
  614.       BorderStyle     =   1  'Fixed Single
  615.       Caption         =   "C1"
  616.       ForeColor       =   &H80000008&
  617.       Height          =   252
  618.       Index           =   6
  619.       Left            =   5040
  620.       TabIndex        =   25
  621.       Top             =   2880
  622.       Width           =   252
  623.    End
  624.    Begin VB.Label Label6 
  625.       Caption         =   "= "
  626.       Height          =   252
  627.       Index           =   1
  628.       Left            =   5556
  629.       TabIndex        =   24
  630.       Top             =   2892
  631.       Width           =   96
  632.    End
  633.    Begin VB.Line Line8 
  634.       X1              =   2460
  635.       X2              =   2460
  636.       Y1              =   2580
  637.       Y2              =   2088
  638.    End
  639.    Begin VB.Line Line9 
  640.       X1              =   2460
  641.       X2              =   4032
  642.       Y1              =   2100
  643.       Y2              =   2100
  644.    End
  645.    Begin VB.Line Line10 
  646.       X1              =   4032
  647.       X2              =   4032
  648.       Y1              =   2100
  649.       Y2              =   2172
  650.    End
  651.    Begin VB.Line Line4 
  652.       X1              =   1428
  653.       X2              =   2244
  654.       Y1              =   2520
  655.       Y2              =   2520
  656.    End
  657.    Begin VB.Line Line5 
  658.       X1              =   2244
  659.       X2              =   2244
  660.       Y1              =   2520
  661.       Y2              =   2124
  662.    End
  663.    Begin VB.Line Line6 
  664.       X1              =   2244
  665.       X2              =   2376
  666.       Y1              =   2124
  667.       Y2              =   2124
  668.    End
  669.    Begin VB.Line Line7 
  670.       X1              =   2376
  671.       X2              =   2376
  672.       Y1              =   2124
  673.       Y2              =   1824
  674.    End
  675.    Begin VB.Line Line11 
  676.       X1              =   2376
  677.       X2              =   1500
  678.       Y1              =   1836
  679.       Y2              =   1836
  680.    End
  681.    Begin VB.Line Line12 
  682.       X1              =   1500
  683.       X2              =   1500
  684.       Y1              =   1836
  685.       Y2              =   1908
  686.    End
  687.    Begin VB.Line Line14 
  688.       X1              =   1200
  689.       X2              =   2184
  690.       Y1              =   2472
  691.       Y2              =   2472
  692.    End
  693.    Begin VB.Line Line15 
  694.       X1              =   2184
  695.       X2              =   2184
  696.       Y1              =   2472
  697.       Y2              =   2100
  698.    End
  699.    Begin VB.Line Line17 
  700.       X1              =   2184
  701.       X2              =   2316
  702.       Y1              =   2100
  703.       Y2              =   2100
  704.    End
  705.    Begin VB.Line Line18 
  706.       X1              =   2316
  707.       X2              =   2316
  708.       Y1              =   2100
  709.       Y2              =   1872
  710.    End
  711.    Begin VB.Line Line19 
  712.       X1              =   1740
  713.       X2              =   2316
  714.       Y1              =   1884
  715.       Y2              =   1884
  716.    End
  717.    Begin VB.Line Line20 
  718.       X1              =   1740
  719.       X2              =   1740
  720.       Y1              =   1884
  721.       Y2              =   1932
  722.    End
  723.    Begin VB.Line Line21 
  724.       X1              =   2460
  725.       X2              =   1680
  726.       Y1              =   2580
  727.       Y2              =   2580
  728.    End
  729.    Begin VB.Line Line22 
  730.       X1              =   1680
  731.       X2              =   1680
  732.       Y1              =   2580
  733.       Y2              =   2810
  734.    End
  735.    Begin VB.Line Line24 
  736.       X1              =   996
  737.       X2              =   1740
  738.       Y1              =   2436
  739.       Y2              =   2436
  740.    End
  741.    Begin VB.Line Line25 
  742.       X1              =   1740
  743.       X2              =   1740
  744.       Y1              =   2436
  745.       Y2              =   2124
  746.    End
  747.    Begin VB.Line Line26 
  748.       X1              =   1740
  749.       X2              =   2076
  750.       Y1              =   2124
  751.       Y2              =   2124
  752.    End
  753.    Begin VB.Line Line27 
  754.       X1              =   2076
  755.       X2              =   2076
  756.       Y1              =   1980
  757.       Y2              =   2136
  758.    End
  759.    Begin VB.Line Line28 
  760.       X1              =   2076
  761.       X2              =   2136
  762.       Y1              =   1980
  763.       Y2              =   1980
  764.    End
  765.    Begin VB.Line Line31 
  766.       X1              =   792
  767.       X2              =   1860
  768.       Y1              =   2076
  769.       Y2              =   2076
  770.    End
  771.    Begin VB.Line Line32 
  772.       X1              =   1848
  773.       X2              =   1848
  774.       Y1              =   1968
  775.       Y2              =   2088
  776.    End
  777.    Begin VB.Line Line33 
  778.       X1              =   1848
  779.       X2              =   1908
  780.       Y1              =   1968
  781.       Y2              =   1968
  782.    End
  783.    Begin VB.Line Line35 
  784.       X1              =   4464
  785.       X2              =   5388
  786.       Y1              =   1992
  787.       Y2              =   1992
  788.    End
  789.    Begin VB.Line Line36 
  790.       X1              =   5160
  791.       X2              =   5160
  792.       Y1              =   2220
  793.       Y2              =   2810
  794.    End
  795.    Begin VB.Line Line37 
  796.       X1              =   4356
  797.       X2              =   5160
  798.       Y1              =   2220
  799.       Y2              =   2220
  800.    End
  801.    Begin VB.Line Line38 
  802.       X1              =   3780
  803.       X2              =   4920
  804.       Y1              =   2460
  805.       Y2              =   2460
  806.    End
  807.    Begin VB.Line Line39 
  808.       X1              =   4920
  809.       X2              =   4920
  810.       Y1              =   2460
  811.       Y2              =   2810
  812.    End
  813.    Begin VB.Line Line40 
  814.       X1              =   3780
  815.       X2              =   3780
  816.       Y1              =   2304
  817.       Y2              =   2460
  818.    End
  819.    Begin VB.Line Line41 
  820.       X1              =   3540
  821.       X2              =   4680
  822.       Y1              =   2568
  823.       Y2              =   2568
  824.    End
  825.    Begin VB.Line Line42 
  826.       X1              =   4680
  827.       X2              =   4680
  828.       Y1              =   2568
  829.       Y2              =   2810
  830.    End
  831.    Begin VB.Line Line43 
  832.       X1              =   3540
  833.       X2              =   3540
  834.       Y1              =   2292
  835.       Y2              =   2568
  836.    End
  837.    Begin VB.Shape Shape3 
  838.       BorderColor     =   &H8000000C&
  839.       Height          =   612
  840.       Left            =   1320
  841.       Shape           =   4  'Rounded Rectangle
  842.       Top             =   840
  843.       Width           =   3852
  844.    End
  845.    Begin VB.Label Data_Label 
  846.       Caption         =   " Data"
  847.       Height          =   252
  848.       Left            =   1416
  849.       TabIndex        =   23
  850.       Top             =   660
  851.       Width           =   456
  852.    End
  853.    Begin VB.Label Label6 
  854.       Caption         =   "="
  855.       Height          =   252
  856.       Index           =   3
  857.       Left            =   4296
  858.       TabIndex        =   22
  859.       Top             =   984
  860.       Width           =   96
  861.    End
  862.    Begin VB.Label Label5 
  863.       Alignment       =   2  'Center
  864.       Appearance      =   0  'Flat
  865.       BackColor       =   &H80000005&
  866.       BorderStyle     =   1  'Fixed Single
  867.       Caption         =   "D6"
  868.       ForeColor       =   &H80000008&
  869.       Height          =   252
  870.       Index           =   1
  871.       Left            =   2580
  872.       TabIndex        =   21
  873.       Top             =   960
  874.       Width           =   252
  875.    End
  876.    Begin VB.Label Label5 
  877.       Alignment       =   2  'Center
  878.       Appearance      =   0  'Flat
  879.       BackColor       =   &H80000005&
  880.       BorderStyle     =   1  'Fixed Single
  881.       Caption         =   "D0"
  882.       ForeColor       =   &H80000008&
  883.       Height          =   252
  884.       Index           =   2
  885.       Left            =   4020
  886.       TabIndex        =   20
  887.       Top             =   960
  888.       Width           =   252
  889.    End
  890.    Begin VB.Label Label5 
  891.       Alignment       =   2  'Center
  892.       Appearance      =   0  'Flat
  893.       BackColor       =   &H80000005&
  894.       BorderStyle     =   1  'Fixed Single
  895.       Caption         =   "D1"
  896.       ForeColor       =   &H80000008&
  897.       Height          =   252
  898.       Index           =   3
  899.       Left            =   3780
  900.       TabIndex        =   19
  901.       Top             =   960
  902.       Width           =   252
  903.    End
  904.    Begin VB.Label Label5 
  905.       Alignment       =   2  'Center
  906.       Appearance      =   0  'Flat
  907.       BackColor       =   &H80000005&
  908.       BorderStyle     =   1  'Fixed Single
  909.       Caption         =   "D2"
  910.       ForeColor       =   &H80000008&
  911.       Height          =   252
  912.       Index           =   7
  913.       Left            =   3540
  914.       TabIndex        =   18
  915.       Top             =   960
  916.       Width           =   252
  917.    End
  918.    Begin VB.Label Label5 
  919.       Alignment       =   2  'Center
  920.       Appearance      =   0  'Flat
  921.       BackColor       =   &H80000005&
  922.       BorderStyle     =   1  'Fixed Single
  923.       Caption         =   "D3"
  924.       ForeColor       =   &H80000008&
  925.       Height          =   252
  926.       Index           =   8
  927.       Left            =   3300
  928.       TabIndex        =   17
  929.       Top             =   960
  930.       Width           =   252
  931.    End
  932.    Begin VB.Label Label5 
  933.       Alignment       =   2  'Center
  934.       Appearance      =   0  'Flat
  935.       BackColor       =   &H80000005&
  936.       BorderStyle     =   1  'Fixed Single
  937.       Caption         =   "D4"
  938.       ForeColor       =   &H80000008&
  939.       Height          =   252
  940.       Index           =   9
  941.       Left            =   3060
  942.       TabIndex        =   16
  943.       Top             =   960
  944.       Width           =   252
  945.    End
  946.    Begin VB.Label Label5 
  947.       Alignment       =   2  'Center
  948.       Appearance      =   0  'Flat
  949.       BackColor       =   &H80000005&
  950.       BorderStyle     =   1  'Fixed Single
  951.       Caption         =   "D5"
  952.       ForeColor       =   &H80000008&
  953.       Height          =   252
  954.       Index           =   10
  955.       Left            =   2820
  956.       TabIndex        =   15
  957.       Top             =   960
  958.       Width           =   252
  959.    End
  960.    Begin VB.Label Label5 
  961.       Alignment       =   2  'Center
  962.       Appearance      =   0  'Flat
  963.       BackColor       =   &H80000005&
  964.       BorderStyle     =   1  'Fixed Single
  965.       Caption         =   "D7"
  966.       ForeColor       =   &H80000008&
  967.       Height          =   252
  968.       Index           =   11
  969.       Left            =   2340
  970.       TabIndex        =   14
  971.       Top             =   960
  972.       Width           =   252
  973.    End
  974.    Begin VB.Line Line44 
  975.       Index           =   0
  976.       X1              =   2460
  977.       X2              =   2460
  978.       Y1              =   1260
  979.       Y2              =   1908
  980.    End
  981.    Begin VB.Line Line45 
  982.       X1              =   2700
  983.       X2              =   2700
  984.       Y1              =   1260
  985.       Y2              =   1908
  986.    End
  987.    Begin VB.Line Line46 
  988.       X1              =   2940
  989.       X2              =   2940
  990.       Y1              =   1260
  991.       Y2              =   1908
  992.    End
  993.    Begin VB.Line Line47 
  994.       X1              =   3180
  995.       X2              =   3180
  996.       Y1              =   1260
  997.       Y2              =   1908
  998.    End
  999.    Begin VB.Line Line48 
  1000.       X1              =   3420
  1001.       X2              =   3420
  1002.       Y1              =   1260
  1003.       Y2              =   1908
  1004.    End
  1005.    Begin VB.Line Line49 
  1006.       X1              =   3672
  1007.       X2              =   3672
  1008.       Y1              =   1260
  1009.       Y2              =   1908
  1010.    End
  1011.    Begin VB.Line Line50 
  1012.       X1              =   3912
  1013.       X2              =   3912
  1014.       Y1              =   1260
  1015.       Y2              =   1908
  1016.    End
  1017.    Begin VB.Line Line51 
  1018.       X1              =   4152
  1019.       X2              =   4152
  1020.       Y1              =   1260
  1021.       Y2              =   1908
  1022.    End
  1023.    Begin VB.Label Label10 
  1024.       Alignment       =   2  'Center
  1025.       Appearance      =   0  'Flat
  1026.       BackColor       =   &H80000005&
  1027.       BorderStyle     =   1  'Fixed Single
  1028.       Enabled         =   0   'False
  1029.       ForeColor       =   &H80000008&
  1030.       Height          =   252
  1031.       Index           =   0
  1032.       Left            =   4320
  1033.       TabIndex        =   13
  1034.       Top             =   2880
  1035.       Width           =   252
  1036.    End
  1037. End
  1038. Attribute VB_Name = "pp_gui"
  1039. Attribute VB_GlobalNameSpace = False
  1040. Attribute VB_Creatable = False
  1041. Attribute VB_PredeclaredId = True
  1042. Attribute VB_Exposed = False
  1043. '
  1044. ' File - pp_gui.frm
  1045. '
  1046. ' This application reads and writes data to the Parallel Port, and is
  1047. ' controlled via a graphical user interface - pp_gui.frm
  1048. ' The Parallel Port is accessed directly on the motherboard, using
  1049. ' WinDriver functions.
  1050. '
  1051.  
  1052. Dim hPP As PP_HANDLE
  1053. Dim active_base_addr As Long
  1054.  
  1055. Private Sub About_Button_Click()
  1056.     MsgBox "Parallel Port v1.0" & Chr$(13) & Chr$(13) & _
  1057.     "This sample accesses the Parallel Port" & Chr$(13) _
  1058.     & " through the WinDriver's Visual Basic interface." _
  1059.     & Chr$(13) & Chr$(13) & "Copyright (c) 2000 Jungo" _
  1060.            , vbOKOnly, "About the Parallel Port Sample "
  1061. End Sub
  1062.  
  1063. Private Sub AutoReadCheck_Click()
  1064.     If (pp_gui.AutoReadCheck.Value = 0) Then
  1065.         pp_gui.AutoReadClock = False
  1066.     Else
  1067.         pp_gui.AutoReadClock = True
  1068.     End If
  1069. End Sub
  1070.  
  1071. Private Sub Exit_Button_Click()
  1072.     If (active_base_addr <> 0) Then
  1073.         PP_Close hPP
  1074.     End If
  1075.     Unload pp_gui
  1076. End Sub
  1077.  
  1078. Private Sub Form_Load()
  1079.     pp_gui.Destination.ListIndex = 0
  1080.     If (Not IsPPOpen(hPP)) Then
  1081.         Unload pp_gui
  1082.     End If
  1083.     
  1084.     pp_gui.AutoReadClock = True
  1085. End Sub
  1086.  
  1087. Private Sub AutoReadClock_Timer()
  1088.     If (Not IsPPOpen(hPP)) Then
  1089.         pp_gui.AutoReadCheck.Value = 0
  1090.         pp_gui.AutoReadClock = False
  1091.         GoTo finish
  1092.     End If
  1093.     PaintPins hPP
  1094.  
  1095. finish:
  1096. End Sub
  1097.  
  1098. Private Sub ReadRegisters_Button_Click()
  1099.     If (Not IsPPOpen(hPP)) Then
  1100.         GoTo finish
  1101.     End If
  1102.     PaintPins hPP
  1103.  
  1104. finish:
  1105. End Sub
  1106.  
  1107. Private Sub WriteControl_Button_Click()
  1108.     If (Not IsPPOpen(hPP)) Then
  1109.         GoTo finish
  1110.     End If
  1111.     g_Data = PP_ReadControl(hPP)
  1112.     ask_data.Show vbModal
  1113.     PP_WriteControl hPP, g_Data
  1114.     PaintPins hPP
  1115.  
  1116. finish:
  1117. End Sub
  1118.  
  1119. Private Sub WriteData_Button_Click()
  1120.     If (Not IsPPOpen(hPP)) Then
  1121.         GoTo finish
  1122.     End If
  1123.     
  1124.     g_Data = PP_ReadData(hPP)
  1125.     ask_data.Show vbModal
  1126.     PP_WriteData hPP, g_Data
  1127.     PaintPins hPP
  1128.  
  1129. finish:
  1130. End Sub
  1131.  
  1132. Private Function IsPPOpen(hPP As PP_HANDLE) As Boolean
  1133.     Dim base_addr_index As Long
  1134.     Dim base_addr As Long
  1135.     
  1136.     base_addr_index = pp_gui.Destination.ListIndex
  1137.     If (base_addr_index = 0) Then
  1138.         base_addr = &H378
  1139.     ElseIf (base_addr_index = 1) Then
  1140.         base_addr = &H278
  1141.     ElseIf (base_addr_index = 2) Then
  1142.         base_addr = &H3BC
  1143.     End If
  1144.     
  1145.     If (active_base_addr = base_addr) Then
  1146.         IsPPOpen = True
  1147.         GoTo finish
  1148.     End If
  1149.     
  1150.     ' Going to open other LPT
  1151.     If (active_base_addr <> 0) Then
  1152.         PP_Close hPP
  1153.     End If
  1154.     
  1155.     active_base_addr = 0
  1156.     If (Not PP_Open(hPP, base_addr)) Then
  1157.         IsPPOpen = False
  1158.         GoTo finish
  1159.     End If
  1160.     
  1161.     ' Open finished OK
  1162.     active_base_addr = base_addr
  1163.     PaintPins hPP
  1164.     IsPPOpen = True
  1165.  
  1166. finish:
  1167. End Function
  1168.  
  1169. Private Sub PaintPins(hPP As PP_HANDLE)
  1170.     Dim Data As Byte
  1171.     
  1172.     Data = PP_ReadStatus(hPP)
  1173.     pp_gui.Status.Caption = Hex(Data)
  1174.     
  1175.     ' Painting Status pins
  1176.     If (Data And &H8) Then
  1177.         pp_gui.Pin15.FillStyle = 0
  1178.     Else
  1179.         pp_gui.Pin15.FillStyle = 1
  1180.     End If
  1181.     If (Data And &H10) Then
  1182.         pp_gui.Pin13.FillStyle = 0
  1183.     Else
  1184.         pp_gui.Pin13.FillStyle = 1
  1185.     End If
  1186.     If (Data And &H20) Then
  1187.         pp_gui.Pin12.FillStyle = 0
  1188.     Else
  1189.         pp_gui.Pin12.FillStyle = 1
  1190.     End If
  1191.     If (Data And &H40) Then
  1192.         pp_gui.Pin10.FillStyle = 0
  1193.     Else
  1194.         pp_gui.Pin10.FillStyle = 1
  1195.     End If
  1196.     If (Not Data And &H80) Then
  1197.         pp_gui.Pin11.FillStyle = 0
  1198.     Else
  1199.         pp_gui.Pin11.FillStyle = 1
  1200.     End If
  1201.         
  1202.     ' Painting Control pins
  1203.     Data = PP_ReadControl(hPP)
  1204.     pp_gui.Control.Caption = Hex(Data)
  1205.     
  1206.     If (Not Data And &H1) Then
  1207.         pp_gui.Pin1.FillStyle = 0
  1208.     Else
  1209.         pp_gui.Pin1.FillStyle = 1
  1210.     End If
  1211.     If (Not Data And &H2) Then
  1212.         pp_gui.Pin14.FillStyle = 0
  1213.     Else
  1214.         pp_gui.Pin14.FillStyle = 1
  1215.     End If
  1216.     If (Data And &H4) Then
  1217.         pp_gui.Pin16.FillStyle = 0
  1218.     Else
  1219.         pp_gui.Pin16.FillStyle = 1
  1220.     End If
  1221.     If (Not Data And &H8) Then
  1222.         pp_gui.Pin17.FillStyle = 0
  1223.     Else
  1224.         pp_gui.Pin17.FillStyle = 1
  1225.     End If
  1226.     
  1227.     ' Painting Data pins
  1228.     Data = PP_ReadData(hPP)
  1229.     pp_gui.Data.Caption = Hex(Data)
  1230.     
  1231.     If (Data And &H1) Then
  1232.         pp_gui.Pin2.FillStyle = 0
  1233.     Else
  1234.         pp_gui.Pin2.FillStyle = 1
  1235.     End If
  1236.     If (Data And &H2) Then
  1237.         pp_gui.Pin3.FillStyle = 0
  1238.     Else
  1239.         pp_gui.Pin3.FillStyle = 1
  1240.     End If
  1241.     If (Data And &H4) Then
  1242.         pp_gui.Pin4.FillStyle = 0
  1243.     Else
  1244.         pp_gui.Pin4.FillStyle = 1
  1245.     End If
  1246.     If (Data And &H8) Then
  1247.         pp_gui.Pin5.FillStyle = 0
  1248.     Else
  1249.         pp_gui.Pin5.FillStyle = 1
  1250.     End If
  1251.     If (Data And &H10) Then
  1252.         pp_gui.Pin6.FillStyle = 0
  1253.     Else
  1254.         pp_gui.Pin6.FillStyle = 1
  1255.     End If
  1256.     If (Data And &H20) Then
  1257.         pp_gui.Pin7.FillStyle = 0
  1258.     Else
  1259.         pp_gui.Pin7.FillStyle = 1
  1260.     End If
  1261.     If (Data And &H40) Then
  1262.         pp_gui.Pin8.FillStyle = 0
  1263.     Else
  1264.         pp_gui.Pin8.FillStyle = 1
  1265.     End If
  1266.     If (Data And &H80) Then
  1267.         pp_gui.Pin9.FillStyle = 0
  1268.     Else
  1269.         pp_gui.Pin9.FillStyle = 1
  1270.     End If
  1271. End Sub
  1272.